<template>
  <div>
    <p>{{num}}</p>
    <button @click="changeNum">增加</button>
    <p>{{str}}</p>
    <button @click="changeStr">改变str</button>
  </div>
</template>

<script>

export default {
  name: 'App',
  data() {
    return {
      num: 0,
      str: 'hello world'
    }
  },
  methods: {
    changeNum () {
      this.num++
    },
    changeStr () {
      this.str= '我今天学vue3了'
    }
  }
}
</script>
